package com.ready.spring;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class Jmx {
	public static void main(String[] args) {
		BeanFactory factory = new XmlBeanFactory(new ClassPathResource(
				"Jmx-context.xml"));
		SampleBean bean = (SampleBean) factory.getBean("bean");
		bean.hello();
		sleep();
	}

	public static void sleep() {
		System.out.println("Wait...");
		try {
			Thread.sleep(500000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
